package com.bjsxt.utils;

import com.bjsxt.mapper.AdminMapper;
import com.bjsxt.pojo.Admin;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SystemStartInit {

    @Autowired
    private AdminMapper adminMapper;


    public static Map<Integer,Admin> map = new HashMap<>();


    public void init(){

        List<Admin> list = adminMapper.query(null);
        for (Admin admin : list) {
            map.put(admin.getId(),admin);
        }
        System.out.println("初始化....."+map);

    }

}
